package org.romzzz.gwtclassifieds.client.service;

import java.util.List;
import org.romzzz.gwtclassifieds.client.data.CategoryBean;
import org.romzzz.gwtclassifieds.client.data.ClassifiedBean;
import com.google.gwt.user.client.rpc.AsyncCallback;

public interface ClassifiedServiceAsync {
	
	void enableAdminMode(AsyncCallback<Boolean> callback);
	
	void getCategories(AsyncCallback<List<CategoryBean>> async);
	
	void addCategory(CategoryBean category, AsyncCallback<List<CategoryBean>> async);
	
	void removeCategory(CategoryBean category, AsyncCallback<List<CategoryBean>> async);
	
	void getAllClassifieds(AsyncCallback<List<ClassifiedBean>> async);
	
	void getCategorizedClassifieds(List<CategoryBean> categories, AsyncCallback<List<ClassifiedBean>> async);
	
	void addClassified(ClassifiedBean classified, String password, List<CategoryBean> categories, AsyncCallback<List<ClassifiedBean>> async);
	
	void checkAcces(Long id, String password, AsyncCallback<Long> async);
	
	void updateClassified(ClassifiedBean classified, Long token, List<CategoryBean> categories, AsyncCallback<List<ClassifiedBean>> async);
	
	void removeClassified(Long id, String password, List<CategoryBean> categories, AsyncCallback<List<ClassifiedBean>> async);
	
	void sendFeedback(String name, String message, AsyncCallback<Boolean> async);
	
}
